import React, { Component } from 'react'
import {NavLink} from 'react-router-dom'
export default class RouterLink extends Component {
    render() {
        let {routes,self} = this.props
        return (
            <div>
                {
                    routes.map((item,index)=>{
                        if(!item.title) return
                        return <NavLink key={index} to={item.path} activeClassName={self}>
                            <p className={item.icon}></p>
                            <p>{item.title}</p>
                        </NavLink>
                    })
                }
            </div>
        )
    }
}